In [1]:
import os

## Set directory
os.chdir('/hpc/group/pbenfeylab/CheWei/CW_data/genesys')

import networkx as nx
from genesys_evaluate_v1 import *
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import warnings
# Suppress all warning messages
warnings.filterwarnings("ignore", category=DeprecationWarning)
In [2]:
## Conda Env pytorch-gpu on DCC
print(torch.__version__)
print(sc.__version__) 
1.13.0.post200
1.9.1
In [3]:
## Genes considered/used (shared among samples) 
gene_list = pd.read_csv('./gene_list_1108.csv')

Load Data¶

In [4]:
with open("./genesys_root_data.pkl", 'rb') as file_handle:
    data = pickle.load(file_handle)
    
batch_size = 2000
dataset = Root_Dataset(data['X_test'], data['y_test'])
loader = DataLoader(dataset,
                         batch_size = batch_size,
                         shuffle = True, drop_last=True)
In [5]:
input_size = data['X_train'].shape[1]
## 10 cell types 
output_size = 10
embedding_dim = 256
hidden_dim = 256
n_layers = 2
device = "cpu"
path = "./"

Load trained GeneSys model¶

In [6]:
model = ClassifierLSTM(input_size, output_size, embedding_dim, hidden_dim, n_layers).to(device)
model.load_state_dict(torch.load(path+"best_ALL_1130_continue.pth", map_location=torch.device('cpu')))
model = model
model.eval()
Out[6]:
ClassifierLSTM(
  (fc1): Sequential(
    (0): Linear(in_features=17513, out_features=256, bias=True)
    (1): Dropout(p=0.2, inplace=False)
    (2): GaussianNoise()
  )
  (fc): Sequential(
    (0): ReLU()
    (1): Linear(in_features=512, out_features=512, bias=True)
    (2): ReLU()
    (3): Linear(in_features=512, out_features=10, bias=True)
  )
  (lstm): LSTM(256, 256, num_layers=2, batch_first=True, dropout=0.2, bidirectional=True)
  (dropout): Dropout(p=0.2, inplace=False)
  (b_to_z): DBlock(
    (fc1): Linear(in_features=512, out_features=256, bias=True)
    (fc2): Linear(in_features=512, out_features=256, bias=True)
    (fc_mu): Linear(in_features=256, out_features=512, bias=True)
    (fc_logsigma): Linear(in_features=256, out_features=512, bias=True)
  )
  (bz2_infer_z1): DBlock(
    (fc1): Linear(in_features=1024, out_features=256, bias=True)
    (fc2): Linear(in_features=1024, out_features=256, bias=True)
    (fc_mu): Linear(in_features=256, out_features=512, bias=True)
    (fc_logsigma): Linear(in_features=256, out_features=512, bias=True)
  )
  (z1_to_z2): DBlock(
    (fc1): Linear(in_features=512, out_features=256, bias=True)
    (fc2): Linear(in_features=512, out_features=256, bias=True)
    (fc_mu): Linear(in_features=256, out_features=512, bias=True)
    (fc_logsigma): Linear(in_features=256, out_features=512, bias=True)
  )
  (z_to_x): Decoder(
    (fc1): Linear(in_features=512, out_features=256, bias=True)
    (fc2): Linear(in_features=256, out_features=256, bias=True)
    (fc3): Linear(in_features=256, out_features=17513, bias=True)
  )
)
In [7]:
classes = ['Columella', 'Lateral Root Cap', 'Phloem', 'Xylem', 'Procambium', 'Pericycle', 'Endodermis', 'Cortex', 'Atrichoblast', 'Trichoblast']
class2num = {c: i for (i, c) in enumerate(classes)}
num2class = {i: c for (i, c) in enumerate(classes)}
In [8]:
cts = ['Atrichoblast','Trichoblast','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Lateral Root Cap','Columella']
ctw = np.zeros((len(cts), 17513, 17513))
## number of cells sampled from the atlas
batch_size = 2000
In [9]:
## GRN for the transition t7 to t9
for ct in cts:
    print(ct)
    cws = np.zeros((len(loader), 17513, 17513))
    with torch.no_grad():
        for i, sample in enumerate(loader):
            x = sample['x'].to(device)
            y = sample['y'].to(device)
            y_label = [num2class[i] for i in y.tolist()]
            
            pred_h = model.init_hidden(batch_size)
            tfrom = model.generate_next(x, pred_h, 6).to('cpu').detach().numpy()
            cfrom = tfrom[np.where(np.array(y_label)==ct)[0],:]
            
            pred_h = model.init_hidden(batch_size)
            tto = model.generate_next(x, pred_h, 8).to('cpu').detach().numpy()   
            cto = tto[np.where(np.array(y_label)==ct)[0],:]
            
            cw = torch.linalg.lstsq(torch.tensor(cfrom), torch.tensor(cto)).solution.detach().numpy()
            cws[i] = cw
    
    ## Calculate mean across number of repeats
    cwm = np.mean(cws, axis=0)
    ctw[cts.index(ct)] = cwm
Atrichoblast
Trichoblast
Cortex
Endodermis
Pericycle
Procambium
Xylem
Phloem
Lateral Root Cap
Columella
In [10]:
# Save the array to disk
np.save('genesys_ctw_t7-t9.npy', ctw)
In [11]:
ctw = np.load('genesys_ctw_t7-t9.npy')
In [12]:
## Calculate z-scores
ctw_z = np.zeros((len(cts), 17513, 17513))
for i in range(len(cts)):
    ctw_z[i] = (ctw[i] - np.mean(ctw[i])) / np.std(ctw[i])
In [13]:
## Filtering based on z-scores (with no weights)
ctw_f = np.zeros((len(cts), 17513, 17513))
## z-score threshold (keep values > mean + threshold*std)
threshold=3
for i in range(len(cts)):
    ctw_f[i] = np.abs(ctw_z[i]) > threshold

Load TFs list¶

In [14]:
wanted_TFs = pd.read_csv("./Kay_TF_thalemine_annotations.csv")
In [15]:
## Make TF names unique and assign preferred names
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G33880"]="WOX9"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G45160"]="SCL27"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G04410"]="NAC78"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G29035"]="ORS1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G02540"]="ZHD3"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G16500"]="IAA26"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G09740"]="HAG5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT4G24660"]="ZHD2"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G46880"]="HDG5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G28420"]="RLT1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G14580"]="BLJ"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G45260"]="BIB"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G02070"]="RVN"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G28160"]="FIT"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G68360"]="GIS3"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G20640"]="NLP4"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G05550"]="VFP5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G59470"]="FRF1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G15150"]="HAT7"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G14750"]="WER"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G75710"]="BRON"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G74500"]="TMO7"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G12646"]="RITF1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G48100"]="ARR5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT4G16141"]="GATA17L"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G65640"]="NFL"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G62700"]="VND5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT4G36160"]="VND2"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G66300"]="VND3"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G12260"]="VND4"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G62380"]="VND6"
In [16]:
pd.Series(wanted_TFs['Name']).value_counts().head(5)
Out[16]:
NAC001    1
PRE5      1
MYB118    1
MYB21     1
MYB0      1
Name: Name, dtype: int64

Network analysis¶

In [17]:
TFidx = []
for i in wanted_TFs['GeneID']:
    if i in gene_list['features'].tolist():
        TFidx.append(np.where(gene_list['features']==i)[0][0])

TFidx = np.sort(np.array(TFidx))
In [18]:
def network(i):
    ## No weights
    adj_nw = ctw_f[i]
    ## Weighted
    adj = ctw[i]*ctw_f[i]
    ## TF only
    adj = adj[np.ix_(TFidx,TFidx)]
    adj_nw = adj_nw[np.ix_(TFidx,TFidx)]
    
    ## Remove no connect 
    regidx = np.sort(np.array(pd.Series(np.where(adj_nw==True)[0]).value_counts().index[pd.Series(np.where(adj_nw==True)[0]).value_counts()>=1]))
    taridx = np.sort(np.array(pd.Series(np.where(adj_nw==True)[1]).value_counts().index[pd.Series(np.where(adj_nw==True)[1]).value_counts()>=1]))
    ## Reciprocol
    keepidx = np.sort(np.array(list(set(regidx).intersection(taridx))))
    #keepidx = np.sort(np.array(list(set(regidx).union(taridx))))
    
    TFID = np.array(gene_list['features'][TFidx])[keepidx].tolist()
    ## TF name to keep
    TFname = []
    for i in np.array(gene_list['features'][TFidx])[keepidx]:
        TFname.append(wanted_TFs['Name'][np.where(wanted_TFs['GeneID']==i)[0][0]])
        
    adj = adj[np.ix_(keepidx,keepidx)]
    
    # Create a NetworkX graph for non-directed edges
    G = nx.Graph()  # supports directed edges and allows for multiple edges between the same pair of nodes
    
    # Add nodes to the graph
    num_nodes = adj.shape[0]
    for i, name in enumerate(TFname):
        G.add_node(i, name=name)
    
    # Add edges to the graph with weights
    for i in range(num_nodes):
        for j in range(num_nodes):
            weight = adj[i, j]
            if weight != 0:
                G.add_edge(i, j, weight=abs(weight), distance=1/abs(weight))
            

    ## Measures the extent to which how close a node is to all other nodes in the network, considering the shortest paths or geodesic distances between nodes
    closeness_centrality = nx.closeness_centrality(G, distance='distance')
    ## Measures the extent to which a node that are not only well-connected but also connected to other well-connected nodes.
    eigenvector_centrality = nx.eigenvector_centrality(G)
    
    # Create a NetworkX graph for diected edges
    G = nx.MultiDiGraph()  # supports directed edges and allows for multiple edges between the same pair of nodes
    
    # Add nodes to the graph
    num_nodes = adj.shape[0]
    for i, name in enumerate(TFname):
        G.add_node(i, name=name)
    
    # Add edges to the graph with weights
    for i in range(num_nodes):
        for j in range(num_nodes):
            weight = adj[i, j]
            if weight != 0:
                G.add_edge(i, j, weight=weight)
    
    ## Measures the number of connections (edges) each node has
    degree_centrality = nx.degree_centrality(G)
    # Calculate outgoing centrality
    out_centrality = nx.out_degree_centrality(G)
    # Calculate incoming centrality
    in_centrality = nx.in_degree_centrality(G)
    ## Measures the extent to which a node lies on the shortest paths between other nodes.
    betweenness_centrality = nx.betweenness_centrality(G, weight='weight')
    
    ## Non_Reciprocal Out centrality
    # Visualize the graph
    pos = nx.spring_layout(G)  # Positions of the nodes
    
    # Node colors based on weighted betweenness centrality
    node_colors = [out_centrality[node] for node in G.nodes()]
    
    # Node sizes based on weighted betweenness centrality
    node_sizes = [out_centrality[node] * 1000 for node in G.nodes()]

    # Get the edge weights as a dictionary
    edge_weights = nx.get_edge_attributes(G, 'weight')
    edge_colors = ['red' if weight > 0 else 'blue' for (_, _, weight) in G.edges(data='weight')]
    
    # Scale the edge weights to desired linewidths
    max_weight = max(edge_weights.values())
    edge_widths = [float(edge_weights[edge]) / max_weight for edge in G.edges]
    
    # Draw the graph
    nx.draw(G, pos=pos, node_color=node_colors, node_size=node_sizes, with_labels=False, width=edge_widths, edge_color=edge_colors)
    # Add node labels
    labels = {node: G.nodes[node]['name'] for node in G.nodes}
    nx.draw_networkx_labels(G, pos=pos, labels=labels, font_size=8)
    
    # Add a colorbar to show the weighted betweenness centrality color mapping
    sm = plt.cm.ScalarMappable(cmap='viridis', norm=plt.Normalize(vmin=min(node_colors), vmax=max(node_colors)))
    sm.set_array([])
    plt.colorbar(sm)
    
    # Show the plot
    plt.show()
    
    dc = pd.DataFrame.from_dict(degree_centrality, orient='index', columns=['degree_centrality'])
    oc = pd.DataFrame.from_dict(out_centrality, orient='index', columns=['out_centrality'])
    ic = pd.DataFrame.from_dict(in_centrality, orient='index', columns=['in_centrality'])
    bc = pd.DataFrame.from_dict(betweenness_centrality, orient='index', columns=['betweenness_centrality'])
    cc = pd.DataFrame.from_dict(closeness_centrality, orient='index', columns=['closeness_centrality'])
    ec = pd.DataFrame.from_dict(eigenvector_centrality, orient='index', columns=['eigenvector_centrality'])
    df = pd.concat([dc,oc,ic,bc,cc,ec], axis=1)
    df.index =TFname
    df = df.sort_values('betweenness_centrality', ascending=False)
    
    return(df)
In [19]:
atri = network(0)
In [20]:
tri = network(1)
In [21]:
cor = network(2)
In [22]:
end = network(3)
In [23]:
per = network(4)
In [24]:
pro = network(5)
In [25]:
xyl = network(6)
In [26]:
phl = network(7)
In [27]:
lrc = network(8)
In [28]:
col = network(9)
In [29]:
atri.columns = ['atri_degree_centrality','atri_out_centrality','atri_in_centrality','atri_betweenness_centrality','atri_closeness_centrality','atri_eigenvector_centrality']
tri.columns = ['tri_degree_centrality','tri_out_centrality','tri_in_centrality','tri_betweenness_centrality','tri_closeness_centrality','tri_eigenvector_centrality']
cor.columns = ['cor_degree_centrality','cor_out_centrality','cor_in_centrality','cor_betweenness_centrality','cor_closeness_centrality','cor_eigenvector_centrality']
end.columns = ['end_degree_centrality','end_out_centrality','end_in_centrality','end_betweenness_centrality','end_closeness_centrality','end_eigenvector_centrality']
per.columns = ['per_degree_centrality','per_out_centrality','per_in_centrality','per_betweenness_centrality','per_closeness_centrality','per_eigenvector_centrality']
pro.columns = ['pro_degree_centrality','pro_out_centrality','pro_in_centrality','pro_betweenness_centrality','pro_closeness_centrality','pro_eigenvector_centrality']
xyl.columns = ['xyl_degree_centrality','xyl_out_centrality','xyl_in_centrality','xyl_betweenness_centrality','xyl_closeness_centrality','xyl_eigenvector_centrality']
phl.columns = ['phl_degree_centrality','phl_out_centrality','phl_in_centrality','phl_betweenness_centrality','phl_closeness_centrality','phl_eigenvector_centrality']
lrc.columns = ['lrc_degree_centrality','lrc_out_centrality','lrc_in_centrality','lrc_betweenness_centrality','lrc_closeness_centrality','lrc_eigenvector_centrality']
col.columns = ['col_degree_centrality','col_out_centrality','col_in_centrality','col_betweenness_centrality','col_closeness_centrality','col_eigenvector_centrality']
In [30]:
## Indentify main regulators in each net work
tff = []
tff = tff + atri[atri['atri_betweenness_centrality']>0].index.tolist()
tff = tff + tri[tri['tri_betweenness_centrality']>0].index.tolist()
tff = tff + lrc[lrc['lrc_betweenness_centrality']>0].index.tolist()
tff = tff + cor[cor['cor_betweenness_centrality']>0].index.tolist()
tff = tff + end[end['end_betweenness_centrality']>0].index.tolist()
tff = tff + per[per['per_betweenness_centrality']>0].index.tolist()
tff = tff + pro[pro['pro_betweenness_centrality']>0].index.tolist()
tff = tff + xyl[xyl['xyl_betweenness_centrality']>0].index.tolist()
tff = tff + phl[phl['phl_betweenness_centrality']>0].index.tolist()
tff = tff + col[col['col_betweenness_centrality']>0].index.tolist()
tf_occurance = pd.DataFrame(pd.Series(tff).value_counts(), columns=['tf_occurance'])
tf_spec = pd.concat([tf_occurance, atri, tri, lrc, cor, end, per, pro, xyl, phl, col], axis=1)
tf_spec = tf_spec.fillna(0)
In [31]:
## Epidermis (atri, tri, lrc)
celltype1='atri'
celltype2='tri'
celltype3='lrc'
ts = tf_spec[tf_spec['tf_occurance']==3][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype3+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype3+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality', celltype3+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==9].sort_values(['centrality_count','centrality_sum'], ascending=False)
Out[31]:
atri_betweenness_centrality tri_betweenness_centrality lrc_betweenness_centrality atri_out_centrality tri_out_centrality lrc_out_centrality atri_in_centrality tri_in_centrality lrc_in_centrality centrality_count centrality_sum
NAC6 0.966043 0.024021 0.211362 0.123919 0.053004 0.013304 0.469741 0.084806 0.042129 9 10.988327
AT2G28710 0.949459 0.003534 0.001715 0.285303 0.042403 0.015521 0.435159 0.102473 0.037694 9 10.873260
In [32]:
## atri, tri
celltype1='atri'
celltype2='tri'
ts = tf_spec[tf_spec['tf_occurance']==2][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==6].sort_values(['centrality_count','centrality_sum'], ascending=False)
Out[32]:
atri_betweenness_centrality tri_betweenness_centrality atri_out_centrality tri_out_centrality atri_in_centrality tri_in_centrality centrality_count centrality_sum
LRL3 0.989289 0.959652 0.409222 0.544170 0.221902 0.886926 6 10.011160
HB17 0.952191 0.879896 0.550432 0.130742 0.340058 0.113074 6 8.966394
RHD6 0.758558 0.770456 0.080692 0.826855 0.086455 0.240283 6 8.763299
WRKY31 0.724676 0.868443 0.253602 0.123675 0.253602 0.236749 6 8.460748
WRKY61 0.787360 0.872015 0.138329 0.056537 0.368876 0.222615 6 8.445731
WRKY45 0.960495 0.003534 0.466859 0.049470 0.605187 0.279152 6 8.364697
MYB50 0.961162 0.186026 0.077810 0.024735 0.342939 0.102473 6 7.695146
AT3G05860 0.030576 0.577413 0.040346 0.137809 0.233429 0.014134 6 7.033707
MC2 0.019065 0.196677 0.069164 0.045936 0.092219 0.137809 6 6.560871
In [33]:
## Atrichoblast specific
celltype = 'atri'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[33]:
atri_betweenness_centrality atri_out_centrality atri_in_centrality centrality_count centrality_sum
NAC003 0.739626 0.152738 0.201729 3 4.094093
TTG2 0.620546 0.167147 0.057637 3 3.845330
AT5G22890 0.262514 0.190202 0.230548 3 3.683264
GL2 0.064125 0.112392 0.106628 3 3.283145
OFP18 0.028652 0.164265 0.144092 3 3.337009
In [34]:
## Trichoblast specific
celltype = 'tri'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[34]:
tri_betweenness_centrality tri_out_centrality tri_in_centrality centrality_count centrality_sum
AT3G53370 0.977846 0.190813 0.201413 3 4.370072
AT5G56200 0.974964 0.074205 0.406360 3 4.455530
IAA31 0.955392 0.120141 0.409894 3 4.485427
RAP2.11 0.946846 0.074205 0.487633 3 4.508684
RSL4 0.864810 0.335689 0.515901 3 4.716400
AT4G09100 0.584455 0.657244 0.367491 3 4.609190
AT5G06800 0.575082 0.194346 0.120141 3 3.889570
AT2G37120 0.373543 0.077739 0.098940 3 3.550222
RSL2 0.358031 0.010601 0.812721 3 4.181352
AT2G20030 0.304814 0.109541 0.081272 3 3.495627
AT4G39160 0.038005 0.310954 0.049470 3 3.398429
WRKY42 0.021377 0.187279 0.067138 3 3.275794
WRKY70 0.003521 0.056537 0.159011 3 3.219069
AT5G04390 0.002118 0.120141 0.084806 3 3.207065
AT1G74410 0.000050 0.106007 0.010601 3 3.116658
AT3G22560 0.000050 0.116608 0.021201 3 3.137859
AT3G10470 0.000013 0.098940 0.003534 3 3.102486
In [35]:
## LRC specific
celltype = 'lrc'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[35]:
lrc_betweenness_centrality lrc_out_centrality lrc_in_centrality centrality_count centrality_sum
CRF3 0.766144 0.177384 0.070953 3 4.014481
OFP6 0.763035 0.148559 0.113082 3 4.024676
ANL2 0.700271 0.082040 0.152993 3 3.935304
AT1G05805 0.555511 0.133038 0.104213 3 3.792762
ATCTH 0.469322 0.104213 0.079823 3 3.653358
IAA1 0.270909 0.166297 0.053215 3 3.490421
ATS 0.267859 0.221729 0.015521 3 3.505110
GATA2 0.248628 0.565410 0.015521 3 3.829559
AT5G64220 0.042385 0.090909 0.024390 3 3.157684
AT2G42300 0.035437 0.090909 0.048780 3 3.175127
WRKY72 0.010461 0.097561 0.070953 3 3.178975
RDUF1 0.004937 0.037694 0.228381 3 3.271013
ARF16 0.002370 0.053215 0.093126 3 3.148712
ATX1 0.002163 0.024390 0.004435 3 3.030988
AGL21 0.001321 0.157428 0.002217 3 3.160966
AT1G69030 0.000094 0.050998 0.028825 3 3.079916
In [36]:
## Columella specific
celltype = 'col'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[36]:
col_betweenness_centrality col_out_centrality col_in_centrality centrality_count centrality_sum
AT2G45120 0.171690 0.061571 0.070064 3 3.303325
PLT2 0.161964 0.104034 0.218684 3 3.484682
RAT5 0.066265 0.065817 0.114650 3 3.246732
AT1G76580 0.017301 0.106157 0.416136 3 3.539594
CHR11 0.008438 0.082803 0.165605 3 3.256846
PRR7 0.006369 0.014862 0.178344 3 3.199575
CRF8 0.006365 0.023355 0.152866 3 3.182586
AT5G65910 0.004716 0.125265 0.154989 3 3.284971
AT3G52250 0.004278 0.140127 0.067941 3 3.212346
LUG 0.004233 0.106157 0.133758 3 3.244148
AT3G08505 0.003813 0.053079 0.067941 3 3.124832
IDD1 0.002123 0.152866 0.029724 3 3.184713
JMJ18 0.002123 0.014862 0.038217 3 3.055202
APRR8 0.002123 0.040340 0.033970 3 3.076433
ALY1 0.002119 0.055202 0.027601 3 3.084921
AT1G01260 0.002114 0.050955 0.055202 3 3.108271
BBX28 0.002114 0.014862 0.038217 3 3.055193
EICBP.B 0.002105 0.087049 0.016985 3 3.106139
AT5G41020 0.002096 0.023355 0.025478 3 3.050928
DPB 0.001893 0.010616 0.002123 3 3.014632
AT1G06070 0.001021 0.059448 0.044586 3 3.105055
RR12 0.000791 0.157113 0.046709 3 3.204612
AT2G44430 0.000388 0.135881 0.127389 3 3.263658
SDG2 0.000154 0.148620 0.055202 3 3.203975
AT4G22360 0.000140 0.057325 0.116773 3 3.174238
SPL14 0.000086 0.148620 0.078556 3 3.227262
ATRX 0.000086 0.214437 0.065817 3 3.280341
E2F1 0.000009 0.048832 0.046709 3 3.095550
In [37]:
## Ground tissue
celltype1='cor'
celltype2='end'
ts = tf_spec[tf_spec['tf_occurance']==2][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==6].sort_values(['centrality_count','centrality_sum'], ascending=False)
Out[37]:
cor_betweenness_centrality end_betweenness_centrality cor_out_centrality end_out_centrality cor_in_centrality end_in_centrality centrality_count centrality_sum
AT1G05710 0.601886 0.023260 0.561866 0.209749 0.983773 0.527326 6 8.907860
MYB74 0.368748 0.059388 0.973631 0.308715 0.010142 0.511078 6 8.231702
MYB68 0.000186 0.008028 0.344828 0.223043 0.002028 0.265879 6 6.843991
MYB122 0.000602 0.014463 0.215010 0.122600 0.154158 0.271787 6 6.778620
JAZ6 0.048319 0.000004 0.152130 0.028065 0.361055 0.005908 6 6.595481
AT4G00940 0.000029 0.014802 0.121704 0.103397 0.012170 0.342688 6 6.594790
AGL102 0.000008 0.023310 0.014199 0.064993 0.010142 0.400295 6 6.512947
AT1G72210 0.015345 0.000002 0.188641 0.020679 0.219067 0.002954 6 6.446689
VIP1 0.000016 0.002919 0.008114 0.085672 0.046653 0.273264 6 6.416639
BLJ 0.000037 0.000031 0.135903 0.165436 0.004057 0.088626 6 6.394089
COL4 0.000103 0.000002 0.101420 0.033973 0.154158 0.020679 6 6.310336
AT4G28030 0.000008 0.000107 0.111562 0.022157 0.152130 0.019202 6 6.305166
SCR 0.000008 0.000004 0.046653 0.057607 0.004057 0.056130 6 6.164460
LBD16 0.000037 0.000011 0.052738 0.038405 0.012170 0.050222 6 6.153583
ERF15 0.002177 0.000002 0.093306 0.020679 0.030426 0.002954 6 6.149545
AT4G16150 0.000021 0.000024 0.024341 0.028065 0.058824 0.031019 6 6.142293
AT2G06025 0.000054 0.000015 0.030426 0.022157 0.052738 0.028065 6 6.133455
HB16 0.000004 0.000162 0.070994 0.019202 0.034483 0.007386 6 6.132230
AT5G24320 0.000029 0.000002 0.052738 0.023634 0.016227 0.032496 6 6.125127
ABF2 0.000041 0.000028 0.044625 0.023634 0.014199 0.036928 6 6.119454
AT2G27580 0.000012 0.000824 0.022312 0.016248 0.058824 0.014771 6 6.112991
AT5G59450 0.000008 0.000015 0.028398 0.054653 0.004057 0.023634 6 6.110764
bZIP2 0.000004 0.000026 0.024341 0.019202 0.006085 0.007386 6 6.057044
ALY3 0.000099 0.000009 0.014199 0.014771 0.012170 0.013294 6 6.054542
In [38]:
## Cortex specific
celltype = 'cor'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[38]:
cor_betweenness_centrality cor_out_centrality cor_in_centrality centrality_count centrality_sum
JKD 0.044072 0.300203 0.115619 3 3.459894
ATL9 0.022791 0.004057 0.030426 3 3.057273
LAF1 0.009400 0.144016 0.829615 3 3.983031
SIGE 0.003884 0.020284 0.052738 3 3.076906
AP2 0.002424 0.030426 0.034483 3 3.067333
AT3G61180 0.001035 0.022312 0.060852 3 3.084199
AT2G46735 0.001022 0.008114 0.024341 3 3.033477
AT2G38300 0.000961 0.024341 0.103448 3 3.128750
AT2G32030 0.000956 0.002028 0.012170 3 3.015155
RLT2 0.000886 0.014199 0.022312 3 3.037398
MBF1B 0.000598 0.004057 0.044625 3 3.049279
RAX2 0.000474 0.281947 0.036511 3 3.318933
AT4G13040 0.000297 0.004057 0.020284 3 3.024638
AT2G47890 0.000058 0.062880 0.030426 3 3.093364
AT2G42660 0.000058 0.016227 0.125761 3 3.142046
IDD7 0.000045 0.006085 0.158215 3 3.164346
ETR2 0.000041 0.028398 0.016227 3 3.044666
AT1G68070 0.000025 0.022312 0.125761 3 3.148098
RGL3 0.000021 0.020284 0.028398 3 3.048702
WRKY57 0.000021 0.093306 0.127789 3 3.221116
ABF3 0.000016 0.024341 0.004057 3 3.028414
AT3G13040 0.000016 0.018256 0.046653 3 3.064925
AT1G70000 0.000016 0.026369 0.044625 3 3.071010
AT2G47850 0.000016 0.012170 0.018256 3 3.030442
ESE3 0.000012 0.016227 0.008114 3 3.024353
RR3 0.000012 0.028398 0.030426 3 3.058836
KNAT3 0.000012 0.024341 0.083164 3 3.107517
RR2 0.000012 0.012170 0.026369 3 3.038552
AT3G16350 0.000008 0.022312 0.020284 3 3.042605
BPC4 0.000008 0.016227 0.020284 3 3.036519
LZF1 0.000008 0.022312 0.012170 3 3.034491
NAC78 0.000008 0.016227 0.004057 3 3.020292
NPR1 0.000008 0.006085 0.042596 3 3.048690
AT4G35270 0.000008 0.018256 0.016227 3 3.034491
bZIP23 0.000004 0.004057 0.002028 3 3.006089
AT5G16800 0.000004 0.006085 0.008114 3 3.014203
AT1G77800 0.000004 0.008114 0.022312 3 3.030430
bZIP52 0.000004 0.012170 0.008114 3 3.020288
KAPP 0.000004 0.004057 0.004057 3 3.008118
AT2G03470 0.000004 0.014199 0.002028 3 3.016231
SIZ1 0.000004 0.008114 0.014199 3 3.022316
DBP1 0.000004 0.012170 0.014199 3 3.026373
GATA17 0.000004 0.004057 0.006085 3 3.010146
GATA27 0.000004 0.050710 0.048682 3 3.099396
TMO7 0.000004 0.004057 0.008114 3 3.012175
NTM1 0.000004 0.008114 0.008114 3 3.016231
MYB14 0.000004 0.022312 0.010142 3 3.032458
AT5G26610 0.000004 0.006085 0.004057 3 3.010146
In [39]:
## Endodermis specific
celltype = 'end'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[39]:
end_betweenness_centrality end_out_centrality end_in_centrality centrality_count centrality_sum
bZIP58 0.047224 0.119645 0.534712 3 3.701581
chr31 0.029040 0.215657 0.127031 3 3.371728
NGA3 0.005548 0.005908 0.005908 3 3.017365
AT4G38340 0.002552 0.042836 0.280650 3 3.326038
HSF3 0.001938 0.007386 0.002954 3 3.012278
ING1 0.001414 0.045790 0.104874 3 3.152078
AT3G16280 0.000623 0.002954 0.001477 3 3.005054
AT1G74840 0.000601 0.004431 0.001477 3 3.006509
ULT1 0.000527 0.007386 0.001477 3 3.009389
ASIL1 0.000500 0.005908 0.002954 3 3.009363
TIFY8 0.000437 0.047267 0.115214 3 3.162919
BBX19 0.000363 0.007386 0.013294 3 3.021042
SPL7 0.000234 0.014771 0.008863 3 3.023867
AT3G10030 0.000225 0.013294 0.016248 3 3.029767
emb1967 0.000197 0.019202 0.035451 3 3.054850
AGL16 0.000190 0.019202 0.008863 3 3.028255
AT4G01280 0.000184 0.008863 0.004431 3 3.013477
MBD10 0.000160 0.008863 0.010340 3 3.019362
SAP7 0.000153 0.025111 0.022157 3 3.047420
AT3G18870 0.000085 0.005908 0.013294 3 3.019288
AT2G39000 0.000068 0.007386 0.002954 3 3.010407
FBH3 0.000063 0.014771 0.010340 3 3.025174
POB1 0.000037 0.023634 0.005908 3 3.029579
COP1 0.000035 0.019202 0.014771 3 3.034008
AT5G41920 0.000033 0.047267 0.031019 3 3.078319
BPC6 0.000028 0.016248 0.008863 3 3.025139
IDD4 0.000026 0.038405 0.056130 3 3.094561
RVN 0.000026 0.033973 0.098966 3 3.132966
ABA1 0.000024 0.028065 0.038405 3 3.066494
WRKY7 0.000020 0.035451 0.069424 3 3.104894
AT3G04930 0.000015 0.011817 0.010340 3 3.022172
ERF73 0.000011 0.010340 0.032496 3 3.042847
FES1 0.000011 0.007386 0.019202 3 3.026599
AT2G33720 0.000011 0.014771 0.101920 3 3.116702
AMS 0.000009 0.017725 0.056130 3 3.073864
AT5G03500 0.000007 0.013294 0.025111 3 3.038411
BIB 0.000004 0.035451 0.033973 3 3.069428
AT3G20800 0.000004 0.025111 0.007386 3 3.032501
HB23 0.000004 0.004431 0.014771 3 3.019207
DEL2 0.000004 0.002954 0.011817 3 3.014775
ZFN3 0.000002 0.016248 0.014771 3 3.031021
AT5G16470 0.000002 0.020679 0.033973 3 3.054655
HMGB1 0.000002 0.022157 0.011817 3 3.033976
AGL42 0.000002 0.031019 0.067947 3 3.098968
AT1G55750 0.000002 0.004431 0.007386 3 3.011819
In [40]:
## Stele
celltype1='per'
celltype2='pro'
celltype3='xyl'
celltype4='phl'
ts = tf_spec[tf_spec['tf_occurance']==4][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype3+'_betweenness_centrality', celltype4+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype3+'_out_centrality', celltype4+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality', celltype3+'_in_centrality', celltype4+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==12].sort_values(['centrality_count','centrality_sum'], ascending=False)
Out[40]:
per_betweenness_centrality pro_betweenness_centrality xyl_betweenness_centrality phl_betweenness_centrality per_out_centrality pro_out_centrality xyl_out_centrality phl_out_centrality per_in_centrality pro_in_centrality xyl_in_centrality phl_in_centrality centrality_count centrality_sum
IAA11 0.00125 0.000003 0.000673 0.000042 0.0075 0.110927 0.291045 0.110218 0.15 0.021523 0.731343 0.10333 12 13.527854
In [41]:
## Pericycle
celltype = 'per'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[41]:
per_betweenness_centrality per_out_centrality per_in_centrality centrality_count centrality_sum
AT2G14880 0.578174 0.04125 0.02875 3 3.648174
ETC1 0.448353 0.06000 0.03750 3 3.545853
NF-YB2 0.331115 0.07500 0.12000 3 3.526115
HTA13 0.177725 0.04625 0.01875 3 3.242725
AT2G20100 0.154229 0.22875 0.03000 3 3.412979
GAMMA-H2AX 0.109718 0.02375 0.02625 3 3.159718
IDD11 0.107380 0.25500 0.03000 3 3.392380
GATA20 0.074492 0.07125 0.09000 3 3.235742
LBD39 0.070462 0.03125 0.04125 3 3.142962
BHLH32 0.065144 0.23250 0.04125 3 3.338894
HTA10 0.054676 0.01375 0.01500 3 3.083426
SHY2 0.035925 0.05125 0.07875 3 3.165925
HDA3 0.019119 0.15500 0.01375 3 3.187869
GATA23 0.018545 0.26250 0.01125 3 3.292295
RVE1 0.001403 0.05750 0.06875 3 3.127653
AGL18 0.001245 0.00375 0.05250 3 3.057495
AT2G01818 0.000263 0.08375 0.06875 3 3.152763
CPUORF7 0.000111 0.03500 0.00875 3 3.043861
LBD14 0.000088 0.09750 0.00500 3 3.102588
NAC080 0.000056 0.03750 0.05250 3 3.090056
AT2G40200 0.000047 0.07625 0.05500 3 3.131297
CDF3 0.000009 0.04000 0.14250 3 3.182509
OFP7 0.000003 0.01000 0.01000 3 3.020003
In [42]:
## Procambium
celltype = 'pro'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[42]:
pro_betweenness_centrality pro_out_centrality pro_in_centrality centrality_count centrality_sum
AT3G03590 0.123640 0.024834 0.006623 3 3.155096
PHB 0.004313 0.066225 0.364238 3 3.434777
RGA1 0.003654 0.011589 0.021523 3 3.036767
AT3G60080 0.000931 0.048013 0.023179 3 3.072123
HUA1 0.000857 0.034768 0.023179 3 3.058804
AT5G12850 0.000763 0.004967 0.006623 3 3.012353
ASHH1 0.000728 0.039735 0.023179 3 3.063642
VAL3 0.000599 0.001656 0.021523 3 3.023777
AIP3 0.000500 0.018212 0.006623 3 3.025334
ARF19 0.000472 0.033113 0.023179 3 3.056764
AT4G31420 0.000467 0.041391 0.011589 3 3.053447
WRKY20 0.000445 0.028146 0.009934 3 3.038524
AL5 0.000247 0.013245 0.001656 3 3.015148
AT3G03550 0.000137 0.036424 0.062914 3 3.099475
BES1 0.000099 0.036424 0.057947 3 3.094470
AT2G38090 0.000071 0.008278 0.043046 3 3.051396
AT3G17100 0.000060 0.034768 0.018212 3 3.053041
AT4G27240 0.000047 0.008278 0.009934 3 3.018259
AT3G02860 0.000038 0.008278 0.001656 3 3.009972
DOF1 0.000030 0.031457 0.014901 3 3.046388
HB18 0.000027 0.021523 0.074503 3 3.096054
PRT1 0.000019 0.110927 0.084437 3 3.195383
AT4G25410 0.000016 0.031457 0.054636 3 3.086109
AT3G10040 0.000014 0.001656 0.001656 3 3.003325
NAGS2 0.000014 0.003311 0.001656 3 3.004981
AT4G26810 0.000011 0.014901 0.001656 3 3.016567
ZML1 0.000011 0.023179 0.004967 3 3.028157
AT1G29950 0.000008 0.009934 0.009934 3 3.019876
SR1 0.000003 0.028146 0.004967 3 3.033115
AT3G10760 0.000003 0.003311 0.013245 3 3.016559
ATU2AF35A 0.000003 0.028146 0.003311 3 3.031460
AT3G50650 0.000003 0.021523 0.006623 3 3.028148
AT2G20280 0.000003 0.033113 0.004967 3 3.038082
In [43]:
## Xylem
celltype = 'xyl'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[43]:
xyl_betweenness_centrality xyl_out_centrality xyl_in_centrality centrality_count centrality_sum
AT1G66810 0.554371 0.246269 0.738806 3 4.539446
ZHD3 0.516665 0.380597 0.850746 3 4.748008
LBD31 0.508417 0.149254 0.701493 3 4.359163
MYB85 0.503928 0.111940 0.559701 3 4.175570
MYB83 0.495848 0.320896 0.813433 3 4.630176
MYB52 0.483952 0.097015 0.753731 3 4.334699
VND2 0.466446 0.134328 0.753731 3 4.354506
NAC050 0.219616 0.201493 0.425373 3 3.846482
MYB46 0.201493 0.514925 0.902985 3 4.619403
IAA6 0.198406 0.246269 0.007463 3 3.452138
VND1 0.066547 0.313433 0.022388 3 3.402368
VND3 0.023005 0.097015 0.447761 3 3.567781
GIF3 0.017843 0.044776 0.208955 3 3.271574
AT5G46910 0.009034 0.022388 0.432836 3 3.464258
CRF6 0.008978 0.044776 0.059701 3 3.113455
AT4G13620 0.008753 0.201493 0.074627 3 3.284873
NAC060 0.008753 0.223881 0.111940 3 3.344574
JLO 0.008585 0.097015 0.873134 3 3.978734
AT1G68200 0.005723 0.119403 0.022388 3 3.147514
VND6 0.004545 0.238806 0.082090 3 3.325440
AT4G16610 0.004433 0.044776 0.089552 3 3.138761
PIF4 0.004321 0.014925 0.201493 3 3.220738
In [44]:
## Phloem
celltype = 'phl'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[44]:
phl_betweenness_centrality phl_out_centrality phl_in_centrality centrality_count centrality_sum
AT3G06220 0.028443 0.008037 0.022962 3 3.059442
TGA3 0.012955 0.008037 0.016073 3 3.037065
CRF1 0.003381 0.053961 0.030999 3 3.088341
NAC045 0.002858 0.032147 0.020666 3 3.055671
AT5G63700 0.001495 0.143513 0.167623 3 3.312632
... ... ... ... ... ...
VRN2 0.000001 0.008037 0.005741 3 3.013779
MBD13 0.000001 0.008037 0.009185 3 3.017223
PEX10 0.000001 0.012629 0.013777 3 3.026408
TCP8 0.000001 0.010333 0.012629 3 3.022963
TGA6 0.000001 0.004592 0.003444 3 3.008038

72 rows × 5 columns

Search for individual genes¶

In [45]:
gene = 'SHR'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[45]:
tf_occurance end_degree_centrality end_out_centrality end_in_centrality end_closeness_centrality end_eigenvector_centrality per_degree_centrality per_out_centrality per_in_centrality per_betweenness_centrality per_closeness_centrality per_eigenvector_centrality pro_degree_centrality pro_out_centrality pro_in_centrality pro_betweenness_centrality pro_closeness_centrality pro_eigenvector_centrality
SHR 2.0 0.007386 0.005908 0.001477 0.000229 0.007293 0.055 0.0475 0.0075 0.000205 0.000429 0.022521 0.054636 0.033113 0.021523 0.000003 0.000192 0.029372
In [46]:
gene = 'BLJ'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[46]:
tf_occurance cor_degree_centrality cor_out_centrality cor_in_centrality cor_betweenness_centrality cor_closeness_centrality cor_eigenvector_centrality end_degree_centrality end_out_centrality end_in_centrality end_betweenness_centrality end_closeness_centrality end_eigenvector_centrality
BLJ 2.0 0.139959 0.135903 0.004057 0.000037 0.000284 0.065661 0.254062 0.165436 0.088626 0.000031 0.000329 0.114923
In [47]:
gene = 'JKD'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[47]:
tf_occurance cor_degree_centrality cor_out_centrality cor_in_centrality cor_betweenness_centrality cor_closeness_centrality cor_eigenvector_centrality end_degree_centrality end_out_centrality end_in_centrality end_closeness_centrality end_eigenvector_centrality
JKD 1.0 0.415822 0.300203 0.115619 0.044072 0.000351 0.116992 0.153619 0.076809 0.076809 0.000282 0.083118
In [48]:
gene = 'RVN'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[48]:
tf_occurance cor_degree_centrality cor_out_centrality cor_in_centrality cor_closeness_centrality cor_eigenvector_centrality end_degree_centrality end_out_centrality end_in_centrality end_betweenness_centrality end_closeness_centrality end_eigenvector_centrality
RVN 1.0 0.026369 0.014199 0.01217 0.000222 0.01834 0.132939 0.033973 0.098966 0.000026 0.000268 0.073572
In [49]:
gene = 'BIB'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[49]:
tf_occurance end_degree_centrality end_out_centrality end_in_centrality end_betweenness_centrality end_closeness_centrality end_eigenvector_centrality
BIB 1.0 0.069424 0.035451 0.033973 0.000004 0.000259 0.050834
In [50]:
gene = 'IME'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[50]:
In [51]:
gene = 'MYB66'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[51]:
In [52]:
gene = 'GL2'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[52]:
tf_occurance atri_degree_centrality atri_out_centrality atri_in_centrality atri_betweenness_centrality atri_closeness_centrality atri_eigenvector_centrality lrc_degree_centrality lrc_out_centrality lrc_in_centrality lrc_closeness_centrality lrc_eigenvector_centrality
GL2 1.0 0.21902 0.112392 0.106628 0.064125 0.00072 0.069171 0.017738 0.004435 0.013304 0.000546 0.011854
In [53]:
tf_spec.to_csv('TF_GRN_centrality_t7-t9_zscore3.csv', index=True)
In [ ]: